import { useEffect, useState } from 'react'
import { Select } from 'antd'

const { Option } = Select

function useHeroCategories(fn: any) {
    const [heroCategories, setData] = useState([])
    const children = []
    useEffect(() => {
        fn().then((res: any) => {
            setData(res[0].children? res[0].children: res)
        })
    }, [])
    return {
        heroCategories
    }
}

export {
    useHeroCategories
}